package com.wy.service.impl.wy;

import com.wy.dao.BuildingsMapper;
import com.wy.model.sys.Buildings;
import com.wy.service.wy.BuildingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("buildingServiceImpl")
public class BuildingServiceImpl implements BuildingService {

	@Autowired
	private BuildingsMapper buildingsMapper;


	@Override
	public List<Buildings> buildingList(int pageSize, int start) {
		return buildingsMapper.buildingList(pageSize,start);
	}

	@Override
	public List<Buildings> buildingAll() {
		return buildingsMapper.buildingAll();
	}

	@Override
	public Integer buildingSize(int pageSize, int start) {
		return buildingsMapper.buildingSize(pageSize,start);
	}

	@Override
	public void insertBuilding(Buildings buildings) {
		buildingsMapper.insert(buildings);
	}

	@Override
	public void updateBuilding(Buildings buildings) {
		buildingsMapper.updateByPrimaryKey(buildings);
	}

	@Override
	public void deleteBuilding(Integer hid) {
		buildingsMapper.deleteByPrimaryKey(hid);
	}
}
